/**
 * Filename: SkinConfig.java
 * @author  Firefly
 * @contact postfirefly@163.com
 * @time    2016/4/11 11:12
 */
package com.github.postsanf.yinian.utils;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.res.AssetManager;
import android.content.res.Resources;
import android.os.AsyncTask;

import java.lang.reflect.Method;
/**
 * 皮肤配置
 */
public class SkinConfig {
	private static SkinConfig mInstance;
	private Context mContext;


	public SkinConfig(Context mContext) {
		super();
		this.mContext = mContext;
	}

	public static SkinConfig getInstance(Context mContext) {
		if (mInstance == null) {
			mInstance = new SkinConfig(mContext);
		}
		return mInstance;
	}


	public void setSkinResourcePath(String skinPath) {
		SharedPreferences sp = mContext.getSharedPreferences("skin_sharePref", mContext.MODE_PRIVATE);
		SharedPreferences.Editor editor = sp.edit();
		editor.putString("skinPath",skinPath);
		editor.commit();
	}


	public String getSkinResourcePath() {
		SharedPreferences sp = mContext.getSharedPreferences("skin_sharePref", mContext.MODE_PRIVATE);
		return sp.getString("skinPath", "");
	}
}